<?php
/**
 * Table head title link for sorting list
 * 
 * @author Mitchelle Pascual <mitch.pascual@gmail.com>
 * $date 04/01/2010
 *
 */
class Owg_View_Helper_ListTitle extends Zend_View_Helper_Abstract
{
	public function listTitle($p_sTitle)
	{
		$asc = Zend_Controller_Front::getInstance()->getRequest()->getParam('asc', 'true');
		if ($asc == 'true')
		{
			$asc = 'false';
		}
		else
		{
			$asc = 'true';
		}
		
		$url = Owg_Utility_Url::url('column', 'asc');
		$url .= '/column/' . urlencode($p_sTitle) . '/asc/' . $asc ;	
				
		return '<a href="' . $url . '">' . $p_sTitle . '</a>';
	}
	
}